import requests
import json

payload_match = {
    'term': 'angelababy',
    # 'term': 'demo',
    'from': 0,
    'size': 10,
    'highlight': True,
    'order_by': 'relative',
    # 'min_relative': 0.3,
    # 'max_relative': 0.2,
    # 'min_influence': 200.0,
    # 'max_influence': 700.0,
    'filters': {
        # "avg_read_num": [200, ],
        # "category": ["女装/女士精品", '男装']
        # "keywords": ['大码', '蕾丝']

    },
    # 'order_by': "avg_like-num"

}

r_match = requests.post('http://localhost:5000/search/v1.1/wechat', json=payload_match, timeout=200)
a_match = r_match.json()
print("1. wechat kol match\n")
print(json.dumps(a_match, indent=4, sort_keys=True, ensure_ascii=False))